1. Field of the Invention
The present invention relates to a communication terminal system and, in particular, to a method and apparatus for updating a communication terminal system""s program at a remote site using a network.
2. Description of the Prior Art
In current systems, program updating can be easily performed by the use of a flash memory instead of a Read Only Memory(ROM). Particularly, in a system which updates a program to a new version through a network, a flash memory is used.
The prior art with respect to a program updating method and apparatus for a communication terminal system is described with reference to the accompanied drawings.
FIG. 1 is a block diagram showing a constitution of an example of a communication system according to the conventional art.
A communication terminal system includes a flash memory 130 for storing a program for the system operation control, a system memory 140 for storing operational data according to the operation of the system, a CPU (Central Processing Unit) 110 for controlling the entire operation of the system, a network interface unit 150 for communicating with a remote server, a user interface unit 160 for inputting signals using a keyboard or a mouse, a VGA (Video Graphic Array) interface unit 170 for outputting video signals by a display apparatus (not shown), and a system control unit 120 connected with the CPU 110, the flash memory 130, the system memory 140, the network interface unit 150, the user interface unit 160, and the VGA interface unit 170. A bus is connected with the remote server in which a new version of data exists via the network interface unit 150, and the CPU 110 updates the data stored in the flash memory 130 to the new version of data which exists in the remote server.
The data stored in the flash memory 130, as shown in FIG. 2, comprises a system initialization code source, a master code source, and a master code copy. The system initialization code source is positioned starting from an xe2x80x980xe2x80x99(HEX) address of the flash memory 130. When the system is powered xe2x80x9cONxe2x80x9d the operation of the CPU 110 starts from the xe2x80x980xe2x80x99(HEX) address. Therefore the CPU 110 executes the system initialization code to initialize the system when the power is xe2x80x9cONxe2x80x9d.
The master code source is a basic program of the system for controlling the network operation, VGA operation, etc. The master code copy is reproduced from the master code source. The data updating process of the flash memory 130 will be explained referring to FIG. 1 and FIG. 3.
FIG. 3 is a flow chart of an example of the data updating process according to the prior art.
When the system is powered xe2x80x9con xe2x80x9d, the CPU 110 controls the system control unit 120 so as to output the xe2x80x980xe2x80x99(HEX) address of the flash memory 130. When the system control unit 120 transfers the system initialization code source stored in the xe2x80x980xe2x80x99(HEX) address of the flash memory 130 to the CPU 110, the system initialization code source is executed to initialize the system. After system initialization, the CPU 110 loads the master code source and copy stored in the flash memory 130 into the system memory 140 by controlling the system control unit 120. The reason thereof is to properly operate the program already being executed when updating the data stored in the flash memory 130.
The CPU 110 checks the check sum of the master code source, and if there is no malfunction, determines the master code source as normal and thus executes the master code source stored in the system memory 140. Afterwards, the CPU searches a server and determines whether the master code stored in the flash memory 130 requires an update or not by comparing the master code source stored in the flash memory 130 with the master code of the server.
If the master code of the flash memory 130 requires an update to a new version, the CPU 110, after updating the master code copy of the flash memory 130 with the master code of the server, updates the master code source of the flash memory 130 and turns the power xe2x80x9cOFF/ONxe2x80x9d, thereby actuating the system with an updated master code.
If the master code does not require an update, the CPU 110 implements the following function according to the signal of a keyboard or a mouse input through the user interface unit 160 and displays a progress on a display apparatus through the VGA interface unit 170.
A master code in an abnormal state will now be explained.
After the system initialization, the checksum of the master code source is checked and the master code is determined as abnormal, the CPU 110 checks the checksum of the master code copy in order to determine if there is something wrong with the master code copy.
If the master code copy is normal, the CPU 110 executes the master code copy, searches a server through the network interface unit 150, and determines whether the master code copy needs an update by comparing the master code copy stored in the flash memory 130 with the master code of the server.
If the master code copy requires an update, the CPU 110, after updating the master code source of the flash memory 130 with the master code of the server, updates the master code copy and turns the power xe2x80x9cOFF/ONxe2x80x9d, thereby actuating the system with an updated master code.
If the master code copy does not require an update, the CPU 110 updates the master code source stored in the flash memory 130 with the master code of the server and turns the power xe2x80x9cOFF/ONxe2x80x9d, thereby actuating the system with an updated master code.
The reason why the master code source is updated although it does not require an update when compared with the server is because the master code source was determined damaged before executing the master code copy.
As described above, in a communication terminal system which updates a program through a network, flash memories are more popularly used. In order to update a program to a new version, a flash memory area to be updated should be deleted and a new version of program should be stored thereon.
However, there is a problem that when a power failure arises during program updating, the program in an area to be updated is deleted and cannot be restored and thus program updating is not performed correctly, resulting in an inoperable system. To solve this problem, in the prior art, the flash memory is provided with the master code copy as well as the master code source. That is, if the master code source is lost due to a power failure or the like during the master code source updating, the CPU 110 executes the system with the master code copy, and the master code source is updated with the master code of the server. As described above, the problem can be solved by providing the flash memory with the master code copy.
Unlike the master code, however, there is another problem that if a system initialization code is lost or incorrectly updated when updating the same, the system is not operable. The reason therefor is that since a system initialization code starts from the xe2x80x980xe2x80x99(HEX) address of the flash memory area, the system initialization code copy is not placed at the xe2x80x980xe2x80x99(HEX) address in the flash memory area though the system initialization code copy is provided. Therefore, the operation of the CPU 110 starts from the xe2x80x980xe2x80x99(HEX) address of the flash memory when the system is powered xe2x80x9cONxe2x80x9d though there is a problem with the system initialization code, and thus the system initialization code source with the problem is executed, so that it is impossible to update the system initialization code to a new version or the existing version.
Accordingly, an object of the present invention, for correcting the conventional problems is to provide a program updating method and apparatus for removing a system inoperable state or wrong operation state due to a power failure during program updating and by providing a memory with a circuit which designates a save area of a system initialization code copy while storing the system initialization code copy in the memory.
A program updating apparatus according to the present invention to achieve the object above includes a section for determining whether a system initialization code source operates normally in a communication terminal system which updates the data of a memory from a remove server using a network, a section for executing the system initialization code copy if the system initialization code source is not operated, and a section for temporarily resetting the system if the system initialization code source is not operated.
A program updating method according to the present invention comprises a first step for determining whether a system initialization code source is executed or not, a second step for executing a system initialization code copy if the system initialization code source is not executed, a third step for determining whether a master code requires updating or not when the system initialization code source or system initialization code copy is executed and updating the same with a master code of a server according to the result of the determination, a fourth step for determining whether the system initialization code requires update or not after updating the master code, and a fifth step for sequentially updating the system initialization code source and copy with a system initialization code of the server if it is determined that the system initialization code requires updating.